home *** CD-ROM | disk | FTP | other *** search
/ Multimedia Producer's Bible / Multimedia Producer's Bible.iso / mac / mTropolis / mTropolis Sampler Files / mFactory Object Model Examples / Source / Momentum / Momentum.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-12-20  |  959 b   |  56 lines  |  [TEXT/MMCC]

  1. /*    Momentum.h
  2. **
  3. **    Copyright 1995, mFactory, Inc.
  4. **    All rights reserved.
  5. */
  6.  
  7. #pragma once
  8.  
  9. #ifndef _Momentum_
  10.     #define _Momentum_
  11.  
  12.     typedef struct MomentumComp MomentumComp;
  13.  
  14.     #ifndef MSelf
  15.         #define MComponentName Momentum
  16.         #define MSelf MomentumComp
  17.         #include "MFusion.h"
  18.     #endif
  19.  
  20.     typedef struct MomentumComp {
  21.         MEvent        f_activateEvent;
  22.         MEvent        f_terminateEvent;
  23.         MDouble        f_mass;
  24.         MDouble        f_initialAngle;
  25.         MDouble        f_initialMagnitude;
  26.         MDouble        f_terminalVelocity;
  27.  
  28.         long        f_timeStamp;            // temporary fields
  29.         double        f_accelerationX;
  30.         double        f_accelerationY;
  31.         double        f_velocityX;
  32.         double        f_velocityY;
  33.         double         f_fractionalX;
  34.         double        f_fractionalY;
  35.     } MomentumComp;
  36.  
  37.     const short kMomentumRev = 0;
  38.  
  39.     enum {
  40.         kMomentumTask, kMomentumNumProcs
  41.     };
  42.  
  43.     const kMomentumSlot = kMBaseCompSlot + 1;
  44.  
  45.     #ifdef __cplusplus
  46.         extern "C" {
  47.     #endif
  48.  
  49.         MErr MomentumTask(MomentumComp *self, MTInfo *tinfo);
  50.  
  51.     #ifdef __cplusplus
  52.         }
  53.     #endif
  54.  
  55. #endif
  56.